package com.zretc.support.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @Description  
 * @Author  jiaminxxi
 * @Date 2020-07-28 11:47:53 
 */

@Entity
@Table ( name ="topicsingle" , schema = "")
public class Topicsingle  implements Serializable {

	private static final long serialVersionUID =  5040255926839259680L;

	/**
	 * 试题编号
	 */
	@Id
   	@Column(name = "topicId" )
	private String topicId;

	/**
	 * 试题题目
	 */
   	@Column(name = "topicName" )
	private String topicName;

	/**
	 * 试题答案
	 */
   	@Column(name = "topicAnswer" )
	private String topicAnswer;

	/**
	 * 试题分数
	 */
   	@Column(name = "topicScore" )
	private Double topicScore;

	/**
	 * 试题难度
	 */
   	@Column(name = "topicLevel" )
	private Integer topicLevel;

	/**
	 * 试题类型
	 */
   	@Column(name = "topicType" )
	private Integer topicType;

	/**
	 * 试题解析
	 */
   	@Column(name = "analysis" )
	private String analysis;

	/**
	 * 课程编号
	 */
   	@OneToOne
	@JoinColumn(name = "courseId")
   	private Course course;

	//学生此题答案（学生查看自己的答题详情需要）
	@Transient
	private String answerContent;

	//学生此题得分（学生查看自己的答题详情需要）
	@Transient
	private Double score;

	public Topicsingle() {

	}

	public Topicsingle(String topicName, String topicAnswer, Double topicScore, Integer topicLevel, Integer topicType, String analysis, Course course) {
		this.topicName = topicName;
		this.topicAnswer = topicAnswer;
		this.topicScore = topicScore;
		this.topicLevel = topicLevel;
		this.topicType = topicType;
		this.analysis = analysis;
		this.course = course;
	}

	public String getAnswerContent() {
		return answerContent;
	}

	public void setAnswerContent(String answerContent) {
		this.answerContent = answerContent;
	}

	public Double getScore() {
		return score;
	}

	public void setScore(Double score) {
		this.score = score;
	}

	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}

	public String getTopicId() {
		return this.topicId;
	}

	public void setTopicId(String topicId) {
		this.topicId = topicId;
	}

	public String getTopicName() {
		return this.topicName;
	}

	public void setTopicName(String topicName) {
		this.topicName = topicName;
	}

	public String getTopicAnswer() {
		return this.topicAnswer;
	}

	public void setTopicAnswer(String topicAnswer) {
		this.topicAnswer = topicAnswer;
	}

	public Double getTopicScore() {
		return this.topicScore;
	}

	public void setTopicScore(Double topicScore) {
		this.topicScore = topicScore;
	}

	public Integer getTopicLevel() {
		return this.topicLevel;
	}

	public void setTopicLevel(Integer topicLevel) {
		this.topicLevel = topicLevel;
	}

	public Integer getTopicType() {
		return this.topicType;
	}

	public void setTopicType(Integer topicType) {
		this.topicType = topicType;
	}

	public String getAnalysis() {
		return this.analysis;
	}

	public void setAnalysis(String analysis) {
		this.analysis = analysis;
	}

	@Override
	public String toString() {
		return "{" +
			"topicId='" + topicId + '\'' +
			"topicName='" + topicName + '\'' +
			"topicAnswer='" + topicAnswer + '\'' +
			"topicScore='" + topicScore + '\'' +
			"topicLevel='" + topicLevel + '\'' +
			"topicType='" + topicType + '\'' +
			"analysis='" + analysis + '\'' +
		'}';
	}



}
